#
# Copyright (C) 2006-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#


include $(TOPDIR)/rules.mk

PKG_NAME:=kexecboot
PKG_VERSION:=git
PKG_REV:=447411662de0a4ba148a816c155018488b082c35
PKG_RELEASE:=20110617

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.gz
PKG_SOURCE_URL:=git://git.linuxtogo.org/home/groups/kexecboot/kexecboot.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)

include $(INCLUDE_DIR)/package.mk

define Package/kexecboot
	SECTION:=utils
	CATEGORY:=Utilities
	TITLE:=This is a nice Linux-As-a-Bootloader implementation based on kexec.
	DEPENDS:=+kexec-tools +kmod-input-evdev
	URL:=http://projects.linuxtogo.org/projects/kexecboot/
endef

CONFIGURE_CMD =./autogen.sh

CONFIGURE_ARGS += \
	--enable-debug=yes \
	--enable-fbui=no \
	--enable-textui=yes

	
define Package/kexecboot/install
	$(INSTALL_DIR) $(1)/proc
	$(INSTALL_DIR) $(1)/mnt
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/kexecboot $(1)/usr/bin

#	$(INSTALL_DIR) $(1)/sbin/
#	$(INSTALL_BIN) ./files/kexecboot.init $(1)/sbin/init
endef

$(eval $(call BuildPackage,kexecboot))
